<%@ page language="java" contentType="text/html; charset=UTF-8"  pageEncoding="UTF-8"%>
<%@ include file="/common/taglibs.jsp"%>

<!--临时查询form表单,可以增加一些分页的查询参数等,如果某一操作触发当前页面刷新,默认情况下提交此form进行查询-->
<form id="pagerForm" method="get" action="${ctx }/config/getList">
    <input type="hidden" name="pageNum" value="1"/><!--【必须】value=1可以写死-->
    <input type="hidden" name="key" value=""/>
</form>

<div class="pageHeader">
    <form onsubmit="return navTabSearch(this);" method="get" action="${ctx }/config/getList">
        <div class="searchBar">
            <table class="searchContent">
                <tr>
                    <td>
                        名称：<input type="text" name="key" value="${key}" maxlength="50"/>
                    </td>
                    <td><div class="buttonActive"><div class="buttonContent"><button type="submit">查询</button></div></div></td>
                </tr>
            </table>
        </div>
    </form>
</div>
	<div class="panelBar">
        <ul class="toolBar">
            <li>
                <a class="add" href="${ctx }/config/toAdd" target="dialog" mask="true" rel="config_add"
                   title="添加配置">
                    <span>添加配置</span>
                </a>
            </li>
        </ul>
     </div>
    <table class="table" width="2000" layoutH="117">
        <thead>
        <tr>
            <th width="30">序号</th>
            <th width="120">配置名称</th>
            <th width="240">配置值</th>
            <th width="200">配置描述</th>
            <th>操作</th>
        </tr>
        </thead>
        <tbody>

        <c:forEach items="${page.data}" var="config" varStatus="status">
            <tr target="switch_id" rel="${config.id}">
                <td>${status.index+1 }
                <td>${config.keyword}</td>
                <td>${config.val}</td>
                <td>${config.descr}</td>
                <td>
                <a href="${ctx }/config/toUpdate?id=${config.id}" target="dialog" mask="true" rel="config_update"
                   title="修改配置">
                    修改
                </a></td>
            </tr>
        </c:forEach>

        </tbody>
    </table>
<div class="panelBar">
    <div class="pages">
        <span>显示</span>
        <select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
            <option value="20">20</option>
            <option value="50">50</option>
            <option value="100">100</option>
            <option value="200">200</option>
        </select>
        <span>条，共${page.count }条</span>
    </div>
    <div class="pagination" targetType="navTab" totalCount="${page.count }" numPerPage="20" pageNumShown="10" currentPage="${page.page }"></div>
</div>
